package com.kuson.springcloud.service;

import com.kuson.springcloud.entities.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(name="cloud-payment-service")
public interface PaymentFeignService {
    //调用了提供者的的接口服务
    @GetMapping(value = "/payment/get/{id}")
    public CommonResult getPaymentBid(@PathVariable("id") Long id);

    /**
     * 设feign的超时时间，默认是1秒钟
     * @return
     */
    @GetMapping(value = "/payment/feign/timeout")
    public String timeOut();
}
